package view.component.menu
{
	import core.Language;
	import core.log.GameLogType;
	import core.log.GameLogger;
	
	import framework.view.components.button.ButtonProxy;
	
	import mapengine.building.ModuleFunctionMapBuilding;
	
	import values.module.ModuleDataValue;
	import values.module.ModuleValueList;

	public class EnlistBuildingMenu extends MapBuildingMenu
	{
		public function EnlistBuildingMenu()
		{
			super();
		}
		
		override protected function get skinReference():String
		{
			return "swf.ui.BuildMenuSkin";
		}
		
		override protected function get proxyMapping():Array
		{
			return [ 
				{ skin:"upgradeBtn", classRef: ButtonProxy, id:"upgradeBtn", text:Language.getText("@enlist_btn_desc"), onClick:clickToEnlist },
				{ skin:"stashBtn", classRef: ButtonProxy, id:"stashBtn", text:Language.getText("@building_menu_stash_button_label"), onClick:clickToStashHandler },
				{ skin:"moveBtn", classRef: ButtonProxy, id:"moveBtn", text:Language.getText("@building_menu_move_button_label"), onClick:clickToMoveHandler },
                { skin:"rotateBtn", classRef: ButtonProxy, id:"rotateBtn", text:Language.getText("@building_menu_rotate_button_label"), onClick:clickToRotateHandler },
				{ skin:"sellBtn", classRef: ButtonProxy, id:"sellBtn", text:Language.getText("@building_menu_sell_button_label"), onClick:clickToSellHandler },
			];
		}
		
		protected function clickToEnlist():void
		{
			GameLogger.log(GameLogType.MODULE_REQUEST, (data as ModuleFunctionMapBuilding).moduleFunctionValue.moduleValue );
			//GameLogger.log(GameLogType.MODULE_REQUEST,ModuleValueList.getByKey("create_player_module") );
		}
	}
}